//
// Created by hjie on 23-8-1.
//

#pragma once

#include <iostream>
#include <cstring>
#include <vector>
#include <cstdlib>
#include <cstdio>
extern "C"
{
#include <libavformat/avformat.h>
#include <libavcodec/avcodec.h>
#include <libavutil/avutil.h>
#include <libavutil/timestamp.h>
#include <libavutil/mathematics.h>
#include <libavutil/timestamp.h>
#include <libavutil/time.h>

};

class DecoderData
{
public:
    AVCodecContext * m_decoder_ctx;
    AVFrame * m_frame;
};

class InputFileCtx
{
public:
    InputFileCtx(const std::string & filename);
    bool InitDecoderData();
    bool ReadPacket();
private:
    AVFormatContext * m_input_format_ctx;
    DecoderData * m_decoder_data;
};





